import { scheduleJob } from "node-schedule";
import {
  refreshCodeforces,
  refreshLeetcode,
  refreshUserDailyStatus,
  refreshCodeforcesAvatar,
  refreshLeetcodeAvatar,
  refreshAtcoderSubmissions,
  refreshAtcoderProblems,
  refreshAtcoderAvatar,
  refreshRating
} from "./refresh.js";

scheduleJob("35 * * * *", () => {
  refreshCodeforces();
  refreshLeetcode();
  refreshAtcoderSubmissions();
  refreshAtcoderProblems();
});

scheduleJob("45 * * * *", () => {
  refreshUserDailyStatus();
  refreshRating();
});

scheduleJob("40 12 * * *", () => {
  refreshLeetcodeAvatar();
  refreshCodeforcesAvatar();
  refreshAtcoderAvatar();
});

// refreshCodeforces();
// refreshLeetcode();
// refreshLeetcodeAvatar();
// refreshCodeforcesAvatar();
// refreshUserDailyStatus();
